package com.wp.design.stratety;

import java.util.HashMap;
import java.util.Map;

public class StratetyFactory {
	public static final Map<String,IStratety> MAP = new HashMap<>();
	public final static EmptyStratety EMPTY_STRATETY = new EmptyStratety();

	private StratetyFactory() {
	}

	static {
		MAP.put(StratetyKey.lijian,new LiJianStratety());
		MAP.put(StratetyKey.fanxian,new FanXianStratety());
		MAP.put(StratetyKey.manjian,new ManJianStratety());
	}
	public static IStratety getStratety(String key){
		return MAP.get(key) == null? EMPTY_STRATETY:MAP.get(key);
	}

	public interface StratetyKey{
		 String lijian = "lijian";
		 String manjian = "manjian";
		 String fanxian = "fanxian";
	}
}
